home *** CD-ROM | disk | FTP | other *** search
- Path: news.pi.net!news
- From: heggie <heggie@pi.net>
- Newsgroups: comp.lang.c++
- Subject: class INTERFACE declaration ??
- Date: Sun, 28 Jan 1996 17:44:31 -0800
- Organization: heggie
- Message-ID: <310C267F.78BC@pi.net>
- NNTP-Posting-Host: gro28.pi.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Win16; I)
-
- I'm trying to implement a Date class who exists
- of three int fields and some interfaces, with the
- last thing i'm having some problems
- (ps using borlands c++ for windows)
- I can't think of a reason why the interface declaration
- of setdate is wrong, anybody outhere maybe????
-
- THANKs in advantage,
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <iostream.h>
-
- class Date
- {
- public:
- void setdate (int d, int m, int y);
- void printdate ();
- void nextday();
-
- private:
- int
- day,
- month,
- year;
- }
-
- void Date::setdate (int d, int m, int y)
- {
- .........
- }
-
- ************************************************
- Compiling ..\SOURCES\OPDR_48.CPP:
- Error ..\SOURCES\OPDR_48.CPP 21: Too many types in declaration
- Error ..\SOURCES\OPDR_48.CPP 22: Type 'Date' may not be defined here
- Error ..\SOURCES\OPDR_48.CPP 22: 'Date::setdate(int,int,int)' is not a
- member of 'Date'
-